From d0e8e50db8264b4e37985838be95e0047328ee11 Mon Sep 17 00:00:00 2001 From: "smh22@firebug.cl.cam.ac.uk" Date: Mon, 30 May 2005 17:08:40 +0000 Subject: [PATCH] bitkeeper revision 1.1597 (429b4898xNVUuBPMVXKa545qSx7i7A) fix xm vif-list and xm vbd-list (modulo error reporting for domain 0) Signed-off-by: Steven Hand --- tools/python/xen/xend/XendClient.py | 4 ++-- tools/python/xen/xend/XendDomain.py | 6 +++--- tools/python/xen/xend/XendDomainInfo.py | 5 ++--- tools/python/xen/xend/server/SrvDomain.py | 9 +++++++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/tools/python/xen/xend/XendClient.py b/tools/python/xen/xend/XendClient.py index 4aa12ca930..012a8b8dcc 100644 --- a/tools/python/xen/xend/XendClient.py +++ b/tools/python/xen/xend/XendClient.py @@ -279,12 +279,12 @@ class Xend: 'period' : period }) def xend_domain_devices(self, id, type): - return self.xendGet(self.domainurl(id), + return self.xendPost(self.domainurl(id), {'op' : 'devices', 'type' : type }) def xend_domain_device(self, id, type, idx): - return self.xendGet(self.domainurl(id), + return self.xendPost(self.domainurl(id), {'op' : 'device', 'type' : type, 'idx' : idx }) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 8bc5092e18..94c299c791 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -637,14 +637,14 @@ class XendDomain: return val def domain_devtype_ls(self, id, type): - """Get list of device indexes for a domain. + """Get list of device sxprs for a domain. @param id: domain @param type: device type - @return: device indexes + @return: device sxprs """ dominfo = self.domain_lookup(id) - return dominfo.getDeviceIndexes(type) + return dominfo.getDeviceSxprs(type) def domain_devtype_get(self, id, type, idx): """Get a device from a domain. diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index a243867ebd..ac0d4b6357 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -25,7 +25,7 @@ from server import messages from xen.xend.XendBootloader import bootloader import sxp from XendLogging import log -from XendError import VmError +from XendError import XendError, VmError from XendRoot import get_component from PrettyPrint import prettyprintstring @@ -555,8 +555,7 @@ class XendDomainInfo: if self.memory is None: raise VmError('missing memory size') cpu = sxp.child_value(config, 'cpu') - if self.recreate and self.dom and cpu is not None: - #xc.domain_pincpu(self.dom, int(cpu)) + if self.recreate and self.dom and cpu is not None and cpu > 0: xc.domain_pincpu(self.dom, 0, 1<